package com.cunshe.common;

import com.cunshe.entity.vo.I18nVO;

import java.util.HashMap;
import java.util.Map;

public class I18n {

   private static Map<String, I18nVO> map = new HashMap<>();
    static {
        map.put("key1", I18nVO.of("公司", "company"));
        map.put("key2", I18nVO.of("电话", "tel"));
        map.put("key3", I18nVO.of("邮箱", "email"));
        map.put("key4", I18nVO.of("售前", "Pre sales"));
        map.put("key5", I18nVO.of("公司", "After sale"));
        map.put("key6", I18nVO.of("版权所有", "copyright"));
        map.put("key7", I18nVO.of("官方商城", "Official mall"));
        map.put("key8", I18nVO.of("微信扫一扫", "Scan wechat"));
        map.put("key9", I18nVO.of("服务热线", "Service hotline"));
        map.put("key10", I18nVO.of("公司地址", "Company address"));

        map.put("key11", I18nVO.of("官方微信", "Official wechat"));
        map.put("key12", I18nVO.of("微信服务平台", "Wechat service platform"));
        map.put("key13", I18nVO.of("您可以通过以下方式联系到我们", "You can contact us by"));
        map.put("key14", I18nVO.of("如果您对我公司及我们的产品感兴趣，欢迎到我公司或者我公司当地办事处来勘察，您也可以通过在线咨询，需求表单提交，发送电子邮件，拨打咨询电话等方式与我们取得沟通!", "If you are interested in our company and our products, you are welcome to visit our company or our local office. You can also communicate with us through online consultation, submission of demand form, sending e-mail, dialing consultation telephone, etc!"));
        map.put("key15", I18nVO.of("联系我们", "contact us"));
        map.put("key16", I18nVO.of("公司介绍", "Company introduction"));
        map.put("key17", I18nVO.of("关于我们", "About us"));
        map.put("key18", I18nVO.of("合作客户", "Cooperative customers"));
        map.put("key19", I18nVO.of("省市自治区", "Provinces"));
        map.put("key20", I18nVO.of("成立", "establish"));

        map.put("key21", I18nVO.of("的产品和服务覆盖", "Product and service coverage"));
        map.put("key22", I18nVO.of("多年行业经验技术团队", "Technical team with many years of industry experience"));
        map.put("key23", I18nVO.of("办事处", "Office"));
        map.put("key24", I18nVO.of("使用案例", "TestCase"));
        map.put("key25", I18nVO.of("工作时间", "working hours"));
        map.put("key26", I18nVO.of("工作时间", "working hours"));
        map.put("key27", I18nVO.of("公司新闻", "News Information"));
        map.put("key28", I18nVO.of("资料下载", "Data download"));
        map.put("key29", I18nVO.of("我们为您提供的不只是服务，而是改变！", "What we provide you is not just service, but change!"));
        map.put("key30", I18nVO.of("产品视频", "Product video"));

        map.put("key31", I18nVO.of("视频列表", "Video list"));
        map.put("key32", I18nVO.of("产品中心", "Product Center"));
        map.put("key33", I18nVO.of("产品展示", "Product classification"));
        map.put("key34", I18nVO.of("产品详情", "product details"));
        map.put("key35", I18nVO.of("售后承诺", "After sales commitment"));
        map.put("key36", I18nVO.of("相关产品", "Related products"));
        map.put("key37", I18nVO.of("免费指导安装，保修1年", "Free installation guidance and 1-year warranty"));
        map.put("key38", I18nVO.of("凡在本公司采购的产品，一律免费指导安装与产品培训；免费保修期为1年。", "All products purchased in the company shall be provided with free installation guidance and product training; The free warranty period is 1 year."));
        map.put("key39", I18nVO.of("预约上门服务", "Make an appointment for door-to-door service"));
        map.put("key40", I18nVO.of("问题报修后，先进行电话等线上方式指导，无法解决问题的，可预约技术人员到现场进行解决。", "After the problem is reported for repair, first give online guidance such as telephone. If the problem cannot be solved, make an appointment for technicians to solve it on site."));

        map.put("key41", I18nVO.of("零保修费", "Zero warranty fee"));
        map.put("key42", I18nVO.of("由于机器自身缺陷造成的损坏，安全免费保修。人为问题造成的损坏，仅收取零部件成本。", "The damage caused by the machine's own defects shall be guaranteed free of charge. For damage caused by human problems, only the cost of parts will be charged."));
        map.put("key43", I18nVO.of("零部件成本价替换", "Parts cost price replacement"));
        map.put("key44", I18nVO.of("保修期过后，本公司继续提供维修服务，零部件一律按成本价替换。", "After the warranty period, the company will continue to provide maintenance services, and all parts will be replaced at the cost price."));
        map.put("key45", I18nVO.of("获取产品报价", "Get product quotation"));


        map.put("key46", I18nVO.of("查看更多", "more"));
        map.put("key47", I18nVO.of("服务热线", "ServiceHotline"));
    }

    public static Map<String, String> getI18n(String lang){
        Map<String, String> m = new HashMap<>(map.size());
        map.forEach((s, i18nVO) -> {
            if(LangEnum.zh.name().equals(lang)){
                m.put(s, i18nVO.getZh());
            } else {
                m.put(s, i18nVO.getEn());
            }
        });
        return m;
    }

}
